/**
 * @type {*[]}
 */
var userStateEnum = [
    {
        code: 1,
        desc: '正常'
    },
    {
        code: 2,
        desc: '关闭'
    },
    {
        code: 3,
        desc: '锁定'
    }
]

export function getUserStateDesc(code) {
    for (var i in userStateEnum) {
        if (code == userStateEnum[i].code) {
            return userStateEnum[i].desc
        }
    }
}

export function getUserStateEnum() {
  return userStateEnum
}

/**
 * @type {*[]}
 */
var msgTypeEnum = [
  {
    code: 1,
    desc: '系统通知'
  },
  {
    code: 2,
    desc: '系统告警'
  },
  {
    code: 3,
    desc: '定时任务通知'
  },
  {
    code: 4,
    desc: '项目通知'
  }
]

export function getMsgTypeDesc(code) {
  for (var i in msgTypeEnum) {
    if (code == msgTypeEnum[i].code) {
      return msgTypeEnum[i].desc
    }
  }
}

export function getMsgTypeEnum() {
  return msgTypeEnum
}

/**
 * @type {*[]}
 */
var notifyStateEnum = [
  {
    code: 0,
    desc: '未读'
  },
  {
    code: 1,
    desc: '已读'
  }
]

export function getNotifyStateDesc(code) {
  for (var i in notifyStateEnum) {
    if (code == notifyStateEnum[i].code) {
      return notifyStateEnum[i].desc
    }
  }
}

export function getNotifyStateEnum() {
  return notifyStateEnum
}


/**
 * @type {*[]}
 */
var menuStateEnum = [
  {
    code: 1,
    desc: '正常'
  },
  {
    code: 2,
    desc: '关闭'
  }
]

export function getMenuStateDesc(code) {
  for (var i in menuStateEnum) {
    if (code == menuStateEnum[i].code) {
      return menuStateEnum[i].desc
    }
  }
}

export function getMenuStateEnum() {
  return menuStateEnum
}


